package com.tengju.bff.interfaces.covercharge.constant;

/**
 * @Author: admin
 * @Description: 来源类型枚举
 * @Date: 2020/12/17 15:50
 */
public enum SourceTypeEnum {

    /**
     * 单创
     */
    DAN_CHUANG(1,"单创"),

    DT(2,"DT"),

    ABM(3,"ABM")
    ;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    private Integer code;

    private String msg;

    SourceTypeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static Integer getSourceCode (String msg){
        for(SourceTypeEnum sourceTypeEnum : (SourceTypeEnum.values())){
            if(sourceTypeEnum.getMsg().equals(msg)){
                return sourceTypeEnum.getCode();
            }
        }
        return null;
    }

}
